package com.portal4kids.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "services_theater_scout")
public class ServicesTheaterScout implements Serializable{
	private static final long serialVersionUID = -5960394091513928485L;
	private int id_service;
	private String address = "none";
	private String name = "none";
	private double time = 00.00;
	private String typeOfService = "none";
	private String description = "none";
	private int rating = 0;
	private int avarage = 0;
	private int numberOfVotes = 0;
	
	@Id
    @GeneratedValue
	public int getId_service() {
		return id_service;
	}
	public void setId_service(int id_service) {
		this.id_service = id_service;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		if(!address.isEmpty())
			this.address = address;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		if(!name.isEmpty())
			this.name = name;
	}
	
	public double getTime() {
		return time;
	}
	public void setTime(double time) {
		if(time > 0.5)
			this.time = time;
	}
	public String getTypeOfService() {
		return typeOfService;
	}
	public void setTypeOfService(String typeOfService) {
		if(!typeOfService.isEmpty())
			this.typeOfService = typeOfService;
	}
	@Column(name="description", length=10000)
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		if(!description.isEmpty())
			this.description = description;
	}
	
	public int getRating() {
		return rating;
	}
	public void setRating(int rating) {
		this.rating = rating;
	}
	public int getAvarage() {
		return avarage;
	}
	public void setAvarage(int avarage) {
		this.avarage = avarage;
	}
	public int getNumberOfVotes() {
		return numberOfVotes;
	}
	public void setNumberOfVotes(int numberOfVotes) {
		this.numberOfVotes = numberOfVotes;
	}
	@Override
	public String toString() {
		return "ServicesTheaterScout [id_service=" + id_service + ", address="
				+ address + ", name=" + name + ", time=" + time
				+ ", timeOfService=" + typeOfService + "]";
	}
	
	

}
